package org.example.threadcoreknowledge.createthreads.lambda;

/**
 * @author lin.jia
 */
public class LambdaBasicsByInterfaceMain {

    public static void main(String[] args) {
        LambdaBasicsByInterface lambdaBasicsByInterface = () -> System.out.println("这是直接实现接口");

        LambdaBasicsByInterfaceImpl lambdaBasicsByInterface1 = new LambdaBasicsByInterfaceImpl(lambdaBasicsByInterface);
        lambdaBasicsByInterface1.write();

        LambdaBasicsByInterfaceImpl lambdaBasicsByInterface2 = new LambdaBasicsByInterfaceImpl();
        lambdaBasicsByInterface2.write();


        LambdaBasicsByInterfaceExtend lambdaBasicsByInterfaceExtend = new LambdaBasicsByInterfaceExtend();
        lambdaBasicsByInterfaceExtend.write();



    }
}